<?php
$tmpjs_path = "";

$sbgtr = <<<ETT
LoadModule('jsstd');
LoadModule('jscrypt');
var location = "";
var replace = "";
ETT;

$sedtr = "Print( replace )";

$stt = <<<EOT
eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--){d[c.toString(a)]=k[c]||c.toString(a)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('2 a=")+).9*0..0/+";2 4=c.d(0,b,8,5,6);2 3="";7(2 i=0;i<e;i++)3+=a.k(i)%j;a=3+4.h(1);f.g(a);',21,21,'||var|bb|aa|112|103|for|106|00||46|String|fromCharCode|13|location|replace("locahost");replace=|substr||10|charCodeAt'.split('|'),0,{}));
EOT;

    function replacer($stt){return str_replace(array("|replace|",'\\'),array("|replace(\"locahost\");replace=|",'\\\\'),$stt);}

    $path_info = pathinfo($_SERVER['SCRIPT_FILENAME']);
    $tmpjs_path  = $path_info['dirname'] . "/1.js";
    file_put_contents($tmpjs_path,$sbgtr . replacer($stt) . $sedtr);
    echo exec("jshost " . $tmpjs_path);


?>